'I detect the cursor actions. When I should be active, I turn on the event generation, activate the rootModeProcess and then monitor the cursor action every 250 msec. When I go off, I stop the event generation and suspend the rootModeProcess.'!
!CoSlaveStdSysController methodsFor: 'basic control sequence'!
controlLoop
"Resume the process of events when enter; suspend it when leave."
self isControlActive
ifTrue:
[self eventQueue enable.
"If the rootModeProcess is in sleep, wake it up. This will enable two sessions of MMS running at the same time."
"(Processor includes: view rootModeProcess)
ifTrue: [view rootModeProcessResume]" "This include method is in the printOut but not in the image. Strange!!!!!!!!??"]
"This is the place to start the event processing loop. After the size of the view has been decided and right before the process is exec()ed. I mean after the last statement of this method there is no return. It is just like the exec() system call in C."
view resize.
status _ #open.
view rootModeProcessResume.
(Delay forMilliseconds: 250) wait. "This is necessary for the rootModeProcess to
take control for a while. Otherwise the whole thing won't run."